package com.atguigu.gmall.feign.seckill;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.seckill.entity.SeckillGoods;
import com.atguigu.gmall.seckill.vo.SeckillOrderConfirmVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.sound.midi.SoundbankResource;

/**
 * @author tangsy
 * @Description TODO
 * @date 2022/12/27 18:07
 * @Version 1.0
 */
@RequestMapping("/api/inner/rpc/seckill")
@FeignClient("service-seckill")
public interface SeckillFeignClient {

    @GetMapping("/today/goods")
    Result getTodaySeckillGoods();

    @GetMapping("/detail/{skuId}")
    Result<SeckillGoods> getSeckillGoodsDetail(@PathVariable("skuId") Long skuId);

    @GetMapping("/order/detail/{code}")
    Result<SeckillOrderConfirmVo>  getSeckillOrderInfo(@PathVariable("code") String code);
}
